Don't show an empty license tab
authorMatthias Clasen <mclasen@redhat.com>
Sat, 15 Feb 2014 22:59:19 +0000 (17:59 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 15 Feb 2014 23:07:09 +0000 (18:07 -0500)
It is not useful to show a license tab, if there's no license
to read.  This was pointed out as a possibility in
https://bugzilla.gnome.org/show_bug.cgi?id=724411

gtk/gtkaboutdialog.c

index 869ea4dd0e59eb7b80e5f641ba2649c5c9f4e2e9..82f721406e5a3e32f3017b51f141394ce1f350e1 100644 (file)
@@ -667,7 +667,7 @@ update_license_button_visibility (GtkAboutDialog *about)
 {
   GtkAboutDialogPrivate *priv = about->priv;
 
-  if (priv->license_type == GTK_LICENSE_CUSTOM && priv->license != NULL)
+  if (priv->license_type == GTK_LICENSE_CUSTOM && priv->license != NULL && priv->license[0] != '\0')
     gtk_widget_show (priv->license_page);
   else
     gtk_widget_hide (priv->license_page);